# The module Element, includes all the page elements (icons, links, buttons,
#text_fields, checkboxes, select lists, dialog-boxes)
require 'watir'
require 'watir/testcase'
require File.dirname(__FILE__)+'/../../std_lib.rb'

module Element

    class Quick_Search
        #        def initialize
        #            @@ie = $ie.div(:id,"Global Search Multi FieldDiv")
        #        end
    
        def self.quick_search_div
            return $ie.div(:id,"Global Search Multi FieldDiv")
        end
        def self.selection_box
            return quick_search_div.select_list(:index=>1)
        end
        def self.textbox_1
            return quick_search_div.text_field(:index=>2)
        end
        def self.textbox_2
            return quick_search_div.text_field(:index=>3)
        end
        def self.textbox_3
            return quick_search_div.text_field(:index=>4)
        end
        def self.textbox_4
            return quick_search_div.text_field(:index=>5)
        end
        def self.advanced_link
            return quick_search_div.link(:text,"Advanced")
        end
        def self.go_button
            return quick_search_div.button(:index=>1)
        end
    end
    class Quick_Create
        def self.quick_create_div
            return $ie.div(:id,"Quick CreateDiv")
        end
        def self.quick_create_account_link
            return quick_create_div.link(:text,"Account")
        end
        def self.quick_create_contact_link
            return quick_create_div.link(:text,"Contact")
        end
        def self.quick_create_lead_link
            return quick_create_div.link(:text,"Lead")
        end
        def self.quick_create_opportunity_link
            return quick_create_div.link(:text,"Opportunity")
        end
        def self.quick_create_project_link
            return quick_create_div.link(:text,"Projects")
        end
        def self.quick_create_sr_link
            return quick_create_div.link(:text,"Service Request")
        end

    end
    class Header_Link
        def self.header_links
            return $ie.div(:id,"header")
        end
        #        @@ie = $ie.div(:id,"header")
        def self.training_and_support
            return header_links.link(:text,"Training and Support")
        end
        def self.admin
            return header_links.link(:text,"Admin")
        end
        def self.sign_out
            return header_links.link(:text,"Sign Out")
        end

    end
    class Tabs
        def self.homepage_tabs
            return  $ie.div(:id,"tabs")
        end
        def self.home_tab
            return homepage_tabs.dive(:text,"Home")
        end
        def self.accounts_tab
            return homepage_tabs.div(:text,"Accounts")
        end
        def self.calendar_tab
            return homepage_tabs.div(:text,"Calender")
        end
        def self.contacts_tab
            return homepage_tabs.div(:text,"Contacts")
        end
        def self.leads_tab
            return homepage_tabs.div(:text,"Leads")
        end
        def self.opportunities_tab
            return homepage_tabs.div(:text,"Opportunities")
        end
        def self.service_tab
            return homepage_tabs.div(:text,"Service")
        end
        def self.dashboard_tab
            return homepage_tabs.div(:text,"Dashboard")
        end
        def self.reports_tab
            return homepage_tabs.div(:text,"Reports")
        end
        def self.agreements_tab
            return homepage_tabs.div(:text,"Agreements")
        end
        def self.renewals_tab
            return homepage_tab.div(:text,"Renewals")
        end
        def self.projects_tab
            return homepage_tabs.div(:text,"Projects")
        end
        def self.product_information
            return homepage_tabs.div(:text,"Product Information")
        end
        def self.campaigns_tab
            return homepage_tabs.div(:text,"Campaigns")
        end

    end
end